package com.ww.springboot.boot.baseTest.design;

import com.ww.springboot.boot.baseTest.design.装饰.ComponentService;
import com.ww.springboot.boot.baseTest.design.装饰.base.Component;
import com.ww.springboot.boot.baseTest.design.装饰.son.DecoratorOne;
import com.ww.springboot.boot.baseTest.design.装饰.son.DecoratorTwo;

public class Run {
	public static void main(String args[]) {
		//装饰者模式 套上一种装饰就多一种功能
		ComponentService interfaceComponent = new DecoratorTwo(new DecoratorOne(new DecoratorOne(new DecoratorTwo(new DecoratorOne(new Component())))));
		interfaceComponent.say();
	}
}
